#ifndef ROBOT_H
#define ROBOT_H

#include <string>
#include "GameObject.h"
#include "Direction.h"
#include "Movable.h"
#include "MoveAbility.h"
#include "Turnable.h"
#include "TurnAbility.h"
#include "Hittable.h"
#include "HitAbility.h"
#include "CheckpointReachable.h"
#include "CheckpointReachedAbility.h"
#include "RepairpointReachable.h"
#include "RepairpointReachedAbility.h"
#include "Droppable.h"
#include "DropAbility.h"

#include "MoveBehavior.h"

class Robot: public GameObject, public Movable, public Turnable, public Hittable, public CheckpointReachable, public RepairpointReachable, public Droppable
{
public:
	Robot(const std::string& type, unsigned int initialCellX, unsigned int initialCellY);
	virtual ~Robot();

	void ScheduleMoveUp();
	void ScheduleMoveDown();
	void ScheduleMoveLeft();
	void ScheduleMoveRight();

	virtual void MoveLeft();
	virtual void MoveRight();
	virtual void MoveUp();
	virtual void MoveDown();
	void TurnLeft();
	void TurnRight();
	virtual void Hit();
	void CheckpointReached();
	void RepairpointReached();
	virtual void Drop();
	virtual void Die();

	virtual GameBehavior* GetBehavior();
	virtual void BehaviorFinished();

protected:

private:


	Direction direction;
	int damage;
	int lives;
	bool gameover;
	std::string robotType;


	MoveAbility* moveAbility;
	TurnAbility* turnAbility;
	HitAbility* hitAbility;
	CheckpointReachedAbility* checkpointreachedAbility;
	RepairpointReachedAbility* repairpointreachedAbility;
	DropAbility* dropAbility;

	GameBehavior* currentBehavior;
	MoveBehavior moveBehavior;
};

#endif //ROBOT_H
